home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 5
/
Amiga Tools 5.iso
/
grafik
/
cataloger
/
picview202
/
picviewaddone.lha
/
Rexx
/
MakeAscii.rexx
next >
Wrap
OS/2 REXX Batch file
|
1996-05-25
|
2KB
|
89 lines
/*********************************************************/
/* MakeAscii.rexx $VER: 1.1 (9.5.96) for PicView */
/* (C) 1996 Maik Solf solf@madhouse.boerde.de */
/* Im collecting handdrawn pictures, contact me 2 swap */
/*********************************************************/
OPTIONS RESULTS
ADDRESS 'PICVIEW.1'
/* open rexxreqtools.library */
IF ~SHOW('L',"rexxreqtools.library") THEN
IF ~ADDLIB("rexxreqtools.library", 0, -30, 0) THEN
EXIT 10
/* Vars */
Enter='0a'x
DEnter=Enter || Enter
/* User-Options */
YourName='Maik Solf'
DefDir='RAM:'
Titel='Pictures from' YourName || Enter || '-----------------------' || DEnter
/* number of pictures */
getentries
Number=RESULT
IF Number=0 THEN DO
rtezrequest('No pictures in current catalog.' , , 'MakeAscii.rexx' )
EXIT 5
END
/* get filename */
Filename=rtfilerequest(DefDir, , "Select File" , , , )
/* open file */
IF OPEN(Handle,Filename,'W')=0 THEN DO
rtezrequest('Couldnt open file.' , , 'MakeAscii.rexx' )
EXIT 20
END
/* write titel */
WRITELN(Handle,Titel)
DO i=0 TO Number-1
/* get data of picture */
/* no parse because Space */
getpicdata i data name
NA=RESULT
getpicdata i data path
PA=RESULT
getpicdata i data file
FI=RESULT
getpicdata i data comment
CM=RESULT
getpicdata i data modetext
MT=RESULT
/* parse possible */
getpicdata i data weekday date time width height depth size format modeid
PARSE VAR RESULT WD DA TI WI HE DP SI FM MI
/* convert to output */
CALL UP_Format
/* write to ascii */
WRITELN(Handle,Entry)
END
IF Number=1
THEN Ende=Number 'picture'
ELSE Ende=Number 'pictures'
WRITELN(Handle,Ende)
CLOSE(handle)
Ende=Ende 'saved as ascii.'
rtezrequest(Ende , , 'MakeAscii.rexx' )
EXIT 0
UP_Format:
/* chance your output */
Entry=''
Entry=Entry || 'Name :' NA || Enter
Entry=Entry || 'Width :' WI || Enter
Entry=Entry || 'Height :' HE || Enter
Entry=Entry || 'Depth :' DP || Enter
Entry=Entry || 'Mode :' MT || Enter
RETURN